﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 亚马逊订单明细
    /// </summary>
    /// 

    public class AMZOrderDetailDTO
    {
        public string code { get; set; }
        public string message { get; set; }
        public string request_id { get; set; }
        public string response_time { get; set; }
        public int total { get; set; }
        public List<AMZOrderDetail> data { get; set; }

    }


    public class AMZOrderDetail
    {
        public string RowId { get; set; }
        /// <summary>
        /// 店铺id
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 店铺id
        /// </summary>
        public string sid { get; set; }
        /// <summary>
        /// 亚马逊订单RowId
        /// </summary>
        public string AmazonOrder { get; set; }
        /// <summary>
        /// 亚马逊订单号
        /// </summary>
        public string amazon_order_id { get; set; }
        
        /// <summary>
        /// 店铺名称
        /// </summary>
        public string seller_name { get; set; }
        /// <summary>
        /// 发货渠道
        /// </summary>
        public string fulfillment_channel { get; set; }
        /// <summary>
        /// 订单状态
        /// </summary>
        public string order_status { get; set; }

        /// <summary>
        /// 订单总金额	
        /// </summary>
        public string order_total_amount { get; set; }
        /// <summary>
        /// 订单金额币种	
        /// </summary>
        public string currency { get; set; }
        /// <summary>
        /// 订单金额币种符号
        /// </summary>
        public string icon { get; set; }
        /// <summary>
        /// 是否为推广订单	
        /// </summary>
        private string _is_assessed;
        public string is_assessed
        {
            get { return _is_assessed; }

            set
            {
                if (value == "0") _is_assessed = "否";
                else if (value == "1") _is_assessed = "是";
                else _is_assessed = value;
            }
        }

        /// <summary>
        /// 是否多渠道订单	
        /// </summary>
        private string _is_mcf_order;
        public string is_mcf_order
        {
            get { return _is_mcf_order; }

            set
            {
                if (value == "0") _is_mcf_order = "普通订单";
                else if (value == "1") _is_mcf_order = "多渠道订单";
                else _is_mcf_order = value;
            }
        }
        /// <summary>
        /// 是否为退货订单	
        /// </summary>
        private string _is_return_order;
        public string is_return_order
        {
            get { return _is_return_order; }

            set
            {
                if (value == "0") _is_return_order = "否";
                else if (value == "1") _is_return_order = "是";
                else _is_return_order = value;
            }
        }
        /// <summary>
        /// 是否已换货	
        /// </summary>
        private string _is_replaced_order;
        public string is_replaced_order
        {
            get { return _is_replaced_order; }

            set
            {
                if (value == "0") _is_replaced_order = "否";
                else if (value == "1") _is_replaced_order = "是";
                else _is_replaced_order = value;
            }
        }

        /// <summary>
        /// 是否为换货订单	
        /// </summary>
        private string _is_replacement_order;
        public string is_replacement_order
        {
            get { return _is_replacement_order; }

            set
            {
                if (value == "0") _is_replacement_order = "否";
                else if (value == "1") _is_replacement_order = "是";
                else _is_replacement_order = value;
            }
        }

        /// <summary>
        /// 订购时间（站点时间）	
        /// </summary>
        public string purchase_date_local { get; set; }

        /// <summary>
        /// 订购时间（utc时间）	
        /// </summary>
        public string purchase_date_local_utc { get; set; }

        /// <summary>
        /// 订单更新（站点时间）
        /// </summary>
        public string last_update_date { get; set; }

        /// <summary>
        /// 订单更新时间（utc时间）	
        /// </summary>
        public string last_update_date_utc { get; set; }

        /// <summary>
        /// 付款时间（站点时间）
        /// </summary>
        public string posted_date { get; set; }
        /// <summary>
        /// 付款时间（站点时间）
        /// </summary>
        public string posted_date_utc { get; set; }

        /// <summary>
        /// 发货时间（站点时间）
        /// </summary>
        public string shipment_date { get; set; }
        /// <summary>
        /// 发货时限（站点时间）	
        /// </summary>
        public string earliest_ship_date { get; set; }
        /// <summary>
        /// 发货时限（utc时间）	
        /// </summary>
        public string earliest_ship_date_utc { get; set; }
        /// <summary>
        /// 是否为B2B订单	
        /// </summary>
        private string _is_business_order;
        public string is_business_order
        {
            get { return _is_business_order; }

            set
            {
                if (value == "0") _is_business_order = "否";
                else if (value == "1") _is_business_order = "是";
                else _is_business_order = value;
            }
        }

        /// <summary>
        /// 是否prime订单	
        /// </summary>
        private string _is_prime;
        public string is_prime
        {
            get { return _is_prime; }

            set
            {
                if (value == "0") _is_prime = "否";
                else if (value == "1") _is_prime = "是";
                else _is_prime = value;
            }
        }

        /// <summary>
        /// 是否优先配送订单	
        /// </summary>
        private string _is_premium_order;
        public string is_premium_order
        {
            get { return _is_premium_order; }

            set
            {
                if (value == "0") _is_premium_order = "否";
                else if (value == "1") _is_premium_order = "是";
                else _is_premium_order = value;
            }
        }

        /// <summary>
        /// 是否促销订单	
        /// </summary>
        private string _is_promotion;
        public string is_promotion
        {
            get { return _is_promotion; }

            set
            {
                if (value == "0") _is_promotion = "否";
                else if (value == "1") _is_promotion = "是";
                else _is_promotion = value;
            }
        }

        /// <summary>
        /// 费用是否含税	
        /// </summary>
        private string _taxes_included;
        public string taxes_included
        {
            get { return _taxes_included; }

            set
            {
                if (value == "1") _taxes_included = "含税";
                else if (value == "2") _taxes_included = "不含税";
                else _taxes_included = value;
            }
        }

        /// <summary>
        /// 配送服务
        /// </summary>
        public string ship_service_level { get; set; }
        /// <summary>
        /// 装运服务级别	
        /// </summary>
        public string shipment_service_level_category { get; set; }
        /// <summary>
        /// 采购订单编号（买家结账时输入）
        /// </summary>
        public string purchase_order_number { get; set; }
        /// <summary>
        /// 付款方式
        /// </summary>
        public string payment_method { get; set; }

        /// <summary>
        /// 亚马逊结账（CBA）的自定义发货标签
        /// </summary>
        public string cba_displayable_shipping_label { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public string order_type { get; set; }

        /// <summary>
        /// 最晚发货时间（承诺配送订单的最晚发货时间）
        /// </summary>
        public string latest_ship_date { get; set; }

        /// <summary>
        /// 最晚发货时间（承诺配送订单的最晚发货时间）
        /// </summary>
        public string latest_ship_date_utc { get; set; }

        /// <summary>
        /// 最早送达时间（承诺送达订单的最早送达时间）备注：UTC时间
        /// </summary>
        public string earliest_delivery_date { get; set; }

        /// <summary>
        /// 最晚送达时间（承诺送达订单的最晚送达时间）备注：UTC时间
        /// </summary>
        public string latest_delivery_date { get; set; }

        /// <summary>
        /// 已发货的商品数
        /// </summary>
        public string number_of_items_shipped { get; set; }

        /// <summary>
        /// 未发货的商品数
        /// </summary>
        public string number_of_items_unshipped { get; set; }

        /// <summary>
        /// 销售渠道
        /// </summary>
        public string sales_channel { get; set; }

        /// <summary>
        /// 订单明细
        /// </summary>
        public List<item_list_AMZOrderDetail> item_list { get; set; }


        /// <summary>
        /// 商品标题
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// MSKU
        /// </summary>
        public string seller_sku { get; set; }
        /// <summary>
        /// ASIN
        /// </summary>
        public string asin { get; set; }
        /// <summary>
        /// asin链接
        /// </summary>
        public string asin_url { get; set; }
        /// <summary>
        /// 本地SKU
        /// </summary>
        public string sku { get; set; }
        /// <summary>
        /// 本地产品id
        /// </summary>
        public string product_id { get; set; }
        /// <summary>
        /// 品名
        /// </summary>
        public string product_name { get; set; }
        /// <summary>
        /// 图片链接
        /// </summary>
        public string pic_url { get; set; }
        /// <summary>
        /// 订单商品编码【订单下唯一，但亚马逊返回值可能会发生变更，以最新数据为准】
        /// </summary>
        public string order_item_id { get; set; }
        /// <summary>
        /// 积分成本（日本站会有此数据）
        /// </summary>
        public string points_monetary_value_amount { get; set; }
        /// <summary>
        /// 下单量
        /// </summary>
        public string quantity_ordered { get; set; }
        /// <summary>
        /// 已配送
        /// </summary>
        public string quantity_shipped { get; set; }
        /// <summary>
        /// 商品支付金额
        /// </summary>
        public string item_price_amount { get; set; }
        /// <summary>
        /// 商品税
        /// </summary>
        public string item_tax_amount { get; set; }
        /// <summary>
        /// 商品运费配送费
        /// </summary>
        public string shipping_price_amount { get; set; }
        /// <summary>
        /// 商品运费税
        /// </summary>
        public string shipping_tax_amount { get; set; }
        /// <summary>
        /// 礼品包装费
        /// </summary>
        public string gift_wrap_price_amount { get; set; }
        /// <summary>
        /// 礼品包装税
        /// </summary>
        public string gift_wrap_tax_amount { get; set; }
        /// <summary>
        /// 配送折扣
        /// </summary>
        public string shipping_discount_amount { get; set; }
        /// <summary>
        /// COD服务费用（货到付款服务费）
        /// </summary>
        public string cod_fee_amount { get; set; }
        /// <summary>
        /// 商品促销id
        /// </summary>
        public string promotion_ids { get; set; }
        /// <summary>
        /// 配送折扣税
        /// </summary>
        public string shipping_discount_tax_amount { get; set; }
        /// <summary>
        /// 商品促销折扣
        /// </summary>
        public string promotion_discount_amount { get; set; }
        /// <summary>
        /// 商品促销折扣税
        /// </summary>
        public string promotion_discount_tax_amount { get; set; }
        /// <summary>
        /// COD服务费用折扣
        /// </summary>
        public string cod_fee_discount_amount { get; set; }
        /// <summary>
        /// 礼品信息（买家提供）
        /// </summary>
        public string gift_message_text { get; set; }
        /// <summary>
        /// 礼品包装级别（买家提供）
        /// </summary>
        public string gift_wrap_level { get; set; }
        /// <summary>
        /// 商品状况说明（卖家提供）
        /// </summary>
        public string condition_note { get; set; }

        /// <summary>
        /// 商品状况（卖家提供）
        /// </summary>
        public string condition_id { get; set; }

        /// <summary>
        /// 商品子状况（卖家提供）
        /// </summary>
        public string condition_subtype_id { get; set; }
        /// <summary>
        /// 计划交货开始日期
        /// </summary>
        public string scheduled_delivery_start_date { get; set; }
        /// <summary>
        /// 计划交货结束日期
        /// </summary>
        public string scheduled_delivery_end_date { get; set; }
        /// <summary>
        /// B2B价格
        /// </summary>
        public string price_designation { get; set; }
        /// <summary>
        /// 采购成本
        /// </summary>
        public string cg_price { get; set; }
        /// <summary>
        /// 其他费名称，比如推广费
        /// </summary>
        public string fee_name { get; set; }
        /// <summary>
        /// 头程费用
        /// </summary>
        public string cg_transport_costs { get; set; }
        /// <summary>
        /// FBA发货费
        /// </summary>
        public string fba_shipment_amount { get; set; }
        /// <summary>
        /// 平台费
        /// </summary>
        public string commission_amount { get; set; }
        /// <summary>
        /// 亚马逊收取的其他费用
        /// </summary>
        public string other_amount { get; set; }
        /// <summary>
        /// 其他费币种，比如推广费
        /// </summary>
        public string fee_currency { get; set; }
        /// <summary>
        /// 其他费币种符号，比如推广费
        /// </summary>
        public string fee_icon { get; set; }
        /// <summary>
        /// 自定义费用本金（店铺对应的币种，例：站外推广费本金）
        /// </summary>
        public string fee_cost_amount { get; set; }
        /// <summary>
        /// 自定义费用本金（fee_currency对应的币种，例：站外推广费本金）
        /// </summary>
        public string fee_cost { get; set; }
        /// <summary>
        /// 销售收益
        /// </summary>
        public string sales_price_amount { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public string unit_price_amount { get; set; }
        /// <summary>
        /// 税费
        /// </summary>
        public string tax_amount { get; set; }
        /// <summary>
        /// 促销费
        /// </summary>
        public string promotion_amount { get; set; }
        /// <summary>
        /// 毛利润
        /// </summary>
        public string profit { get; set; }
        /// <summary>
        /// 商品折扣
        /// </summary>
        public string item_discount { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        public string phone { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string address { get; set; }
        /// <summary>
        /// 城市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string district { get; set; }
        /// <summary>
        /// 国家
        /// </summary>
        public string country { get; set; }


        /// <summary>
        /// 物流单号
        /// </summary>
        public string tracking_number { get; set; }


        /// <summary>
        /// 隐藏日期
        /// </summary>
        public string hide_time { get; set; }
        /// <summary>
        /// 买家邮箱
        /// </summary>
        public string buyer_email { get; set; }
        /// <summary>
        /// 买家名称
        /// </summary>
        public string buyer_name { get; set; }
        /// <summary>
        /// 区域
        /// </summary>
        public string state_or_region { get; set; }
        /// <summary>
        /// 邮政编码
        /// </summary>
        public string postal_code { get; set; }
        /// <summary>
        /// 国家代码
        /// </summary>
        public string country_code { get; set; }
        /// <summary>
        /// 地址1
        /// </summary>
        public string address_line1 { get; set; }
        /// <summary>
        /// 地址2
        /// </summary>
        public string address_line2 { get; set; }
        /// <summary>
        /// 地址3
        /// </summary>
        public string address_line3 { get; set; }
        /// <summary>
        /// 是否退货单
        /// </summary>
        public string is_return { get; set; }
        /// <summary>
        ///收货地址
        /// </summary>
        public string shipping_address { get; set; }


    }

    public class item_list_AMZOrderDetail
    {
        /// <summary>
        /// ID
        /// </summary>
        public string id_detail { get; set; }
        /// <summary>
        /// 商品标题
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// MSKU
        /// </summary>
        public string seller_sku { get; set; }
        /// <summary>
        /// ASIN
        /// </summary>
        public string asin { get; set; }
        /// <summary>
        /// asin链接
        /// </summary>
        public string asin_url { get; set; }
        /// <summary>
        /// 店铺id
        /// </summary>
        public string sid { get; set; }
        /// <summary>
        /// 店铺名称
        /// </summary>
        public string seller_name { get; set; }
        /// <summary>
        /// 本地SKU
        /// </summary>
        public string sku { get; set; }
        /// <summary>
        /// 本地产品id
        /// </summary>
        public string product_id { get; set; }
        /// <summary>
        /// 品名
        /// </summary>
        public string product_name { get; set; }
        /// <summary>
        /// 图片链接
        /// </summary>
        public string pic_url { get; set; }
        /// <summary>
        /// 订单商品编码【订单下唯一，但亚马逊返回值可能会发生变更，以最新数据为准】
        /// </summary>
        public string order_item_id { get; set; }
        /// <summary>
        /// 积分成本（日本站会有此数据）
        /// </summary>
        public string points_monetary_value_amount { get; set; }
        /// <summary>
        /// 下单量
        /// </summary>
        public string quantity_ordered { get; set; }
        /// <summary>
        /// 已配送
        /// </summary>
        public string quantity_shipped { get; set; }
        /// <summary>
        /// 商品支付金额
        /// </summary>
        public string item_price_amount { get; set; }
        /// <summary>
        /// 商品税
        /// </summary>
        public string item_tax_amount { get; set; }
        /// <summary>
        /// 商品运费配送费
        /// </summary>
        public string shipping_price_amount { get; set; }
        /// <summary>
        /// 商品运费税
        /// </summary>
        public string shipping_tax_amount { get; set; }
        /// <summary>
        /// 礼品包装费
        /// </summary>
        public string gift_wrap_price_amount { get; set; }
        /// <summary>
        /// 礼品包装税
        /// </summary>
        public string gift_wrap_tax_amount { get; set; }
        /// <summary>
        /// 配送折扣
        /// </summary>
        public string shipping_discount_amount { get; set; }
        /// <summary>
        /// COD服务费用（货到付款服务费）
        /// </summary>
        public string cod_fee_amount { get; set; }
        /// <summary>
        /// 商品促销id
        /// </summary>
        public List<string> promotion_ids { get; set; }
        /// <summary>
        /// 配送折扣税
        /// </summary>
        public string shipping_discount_tax_amount { get; set; }
        /// <summary>
        /// 商品促销折扣
        /// </summary>
        public string promotion_discount_amount { get; set; }
        /// <summary>
        /// 商品促销折扣税
        /// </summary>
        public string promotion_discount_tax_amount { get; set; }
        /// <summary>
        /// COD服务费用折扣
        /// </summary>
        public string cod_fee_discount_amount { get; set; }
        /// <summary>
        /// 礼品信息（买家提供）
        /// </summary>
        public string gift_message_text { get; set; }
        /// <summary>
        /// 礼品包装级别（买家提供）
        /// </summary>
        public string gift_wrap_level { get; set; }
        /// <summary>
        /// 商品状况说明（卖家提供）
        /// </summary>
        public string condition_note { get; set; }

        /// <summary>
        /// 商品状况（卖家提供）
        /// </summary>
        public string condition_id { get; set; }

        /// <summary>
        /// 商品子状况（卖家提供）
        /// </summary>
        public string condition_subtype_id { get; set; }
        /// <summary>
        /// 计划交货开始日期
        /// </summary>
        public string scheduled_delivery_start_date { get; set; }
        /// <summary>
        /// 计划交货结束日期
        /// </summary>
        public string scheduled_delivery_end_date { get; set; }
        /// <summary>
        /// B2B价格
        /// </summary>
        public string price_designation { get; set; }
        /// <summary>
        /// 采购成本
        /// </summary>
        public string cg_price { get; set; }
        /// <summary>
        /// 其他费名称，比如推广费
        /// </summary>
        public string fee_name { get; set; }
        /// <summary>
        /// 头程费用
        /// </summary>
        public string cg_transport_costs { get; set; }
        /// <summary>
        /// FBA发货费
        /// </summary>
        public string fba_shipment_amount { get; set; }
        /// <summary>
        /// 平台费
        /// </summary>
        public string commission_amount { get; set; }
        /// <summary>
        /// 亚马逊收取的其他费用
        /// </summary>
        public string other_amount { get; set; }
        /// <summary>
        /// 其他费币种，比如推广费
        /// </summary>
        public string fee_currency { get; set; }
        /// <summary>
        /// 其他费币种符号，比如推广费
        /// </summary>
        public string fee_icon { get; set; }
        /// <summary>
        /// 自定义费用本金（店铺对应的币种，例：站外推广费本金）
        /// </summary>
        public string fee_cost_amount { get; set; }
        /// <summary>
        /// 自定义费用本金（fee_currency对应的币种，例：站外推广费本金）
        /// </summary>
        public string fee_cost { get; set; }
        /// <summary>
        /// 销售收益
        /// </summary>
        public string sales_price_amount { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public string unit_price_amount { get; set; }
        /// <summary>
        /// 税费
        /// </summary>
        public string tax_amount { get; set; }
        /// <summary>
        /// 促销费
        /// </summary>
        public string promotion_amount { get; set; }
        /// <summary>
        /// 毛利润
        /// </summary>
        public string profit { get; set; }
        /// <summary>
        /// 商品折扣
        /// </summary>
        public string item_discount { get; set; }

    }
}
